var _n32;
var cc__decorate = __decorate;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var $2UIManager = require("UIManager");
var $2ADManager = require("ADManager");
var $2WeChatTime = require("WeChatTime");
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var def_KuangDian = _n32 = /* */function (_cc$Component42) {
  babel_inherits(n, _cc$Component42);
  var _super46 = babel_createSuper(n);
  function n() {
    var _this99;
    babel_classCallCheck(this, n);
    _this99 = _super46.apply(this, arguments);
    _this99.prog = null;
    _this99.isShowBanner = false;
    return _this99;
  }
  babel_createClass(n, [{
    key: "onLoad",
    value: function onLoad() {
      console.log("kuangdian==");
      _n32._instance = this;
      $2ADManager.default.instance.hideNative();
      $2ADManager.default.instance.hideBanner();
    }
  }, {
    key: "onClickBtn",
    value: function onClickBtn() {
      this.prog.progress += .1;
    }
  }, {
    key: "update",
    value: function update(e) {
      $2WeChatTime.default.videoTime = 0;
      this.prog.progress -= .1 * e;
      if (this.prog.progress < 0) {
        this.prog.progress = 0;
      } else if (this.prog.progress > 1) {
        this.prog.progress = 1, $2ADManager.default.instance.hideBanner(), this.node.destroy();
      }
    }
  }, {
    key: "onDestroy",
    value: function onDestroy() {
      $2ADManager.default.instance.showBanner();
      if ($2UIManager.default.instance.uiList[$2UIManager.UIName.LevelUI]) {
        $2ADManager.default.instance.showNative(1);
        $2ADManager.default.instance.showNative(2);
      }
    }
  }], [{
    key: "instance",
    get() {
      return this._instance;
    }
  }]);
  return n;
}(cc.Component);
def_KuangDian._instance = null;
cc__decorate([ccp_property(cc.ProgressBar)], def_KuangDian.prototype, "prog", undefined);
def_KuangDian = _n32 = cc__decorate([ccp_ccclass], def_KuangDian);
exports.default = def_KuangDian;